import { createRouter,createWebHashHistory, createWebHistory } from "vue-router";
import Home from "../components/HomeView.vue";
import App from "../App.vue";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      component: Home,
      redirect: "/login/zh",
      children: [
        {
          path: "/trends",
          component: () => import("../views/Ljbmodel/index.vue"),
          children: [
            {
              path: "/trends",
              name: "trends",
              component: () => import("../views/Ljbmodel/trends/trends.vue"),
              children: [
                {
                  path: "/new",
                  name: "new",
                  component: () =>
                    import("../views/Ljbmodel/trends/newtrends.vue"),
                },
                {
                  path: "/nearby",
                  name: "nearby",
                  component: () =>
                    import("../views/Ljbmodel/trends/nearby.vue"),
                },
              ],
            },
            {
              path: "/school",
              name: "school",
              component: () => import("../views/Ljbmodel/school/school.vue"),
            },
            {
              path: "/run",
              name: "run",
              component: () => import("../views/Ljbmodel/run/run.vue"),
            },
          ],
        },

        {
          path: "/schoolRun",
          name: " schoolRun",
          component: () => import("../views/Zxtmodel/School.vue"),
        },
        {
          path: "/massage",
          name: "massage",
          component: () => import("../views/Hymodel/index.vue"),
        },
        {
          path: "/my",
          name: "my",
          component: () => import("../views/Dllmodel/index.vue"),
        },
      ],
    },
    // 聊天
    {
      path: "/chat/:name:id:img",
      name: "chat",
      component: () => import("../views/Hymodel/Chat/index.vue"),
    },
    {
      path: "/dll_set",
      name: "dll_set",
      component: () => import("../views/Dllmodel/setting.vue"),
    },
    {
      path: "/dll_guanyu",
      name: "dll_guanyu",
      component: () => import("../views/Dllmodel/Features/guanyu.vue"),
    },
    {
      path: "/dll_yijian",
      name: "dll_yijian",
      component: () => import("../views/Dllmodel/Features/yijian.vue"),
    },
    {
      path: "/dll_bangzhu",
      name: "dll_bangzhu",
      component: () => import("../views/Dllmodel/Features/bangzhu.vue"),
    },
    {
      path: "/dll_shoucang",
      name: "dll_shoucang",
      component: () => import("../views/Dllmodel/Features/shoucang.vue"),
    },
    {
      path: "/dll_myself",
      name: "dll_myself",
      component: () => import("../views/Dllmodel/Features/myself.vue"),
    },
    {
      path: "/dll_personal",
      name: "dll_personal",
      component: () => import("../views/Dllmodel/Features/personal.vue"),
    },
    {
      path: "/dll_share",
      name: "dll_share",
      component: () => import("../views/Dllmodel/Share/share.vue"),
    },
    {
      path: "/dll_zhanghao",
      name: "dll_zhanghao",
      component: () => import("../views/Dllmodel/Setting/zhanghao.vue"),
    },

    {
      path: "/search",
      name: "search",
      component: () => import("../views/Ljbmodel/search/search.vue"),
    },
    {
      path: "/searchresult",
      name: "searchresult",
      component: () => import("../views/Ljbmodel/search/searchResult.vue"),
    },
    {
      path: "/release",
      name: "release",
      component: () => import("../views/Ljbmodel/trends/release.vue"),
    },

    {
      path: "/Set",
      name: " Set",
      component: () => import("../views/Zxtmodel/Set.vue"),
    },
    {
      path: "/zxtRun",
      name: " zxtRun",
      component: () => import("../views/Zxtmodel/Run.vue"),
    },

    {
      path: "/login",
      name: "login",
      component: () => import("../views/Lzsmodel/index.vue"),
      children: [
        {
          path: "zh",

          component: () => import("../views/Lzsmodel/zh.vue"),
        },
        {
          path: "dx",

          component: () => import("../views/Lzsmodel/dx.vue"),
        },
      ],
    },
  ],
});

export default router;
